<template>
  <div class="container">
    <div class="popup1">
        <button type="button" class="closeone" @click="closeTx">x</button>
        <div class="body">
            <div class="biaoyu">提现到支付宝</div>
            <div class="boxint">
                <div class="img"><img class="imgic" src="../../assets/img/zfb.png" alt=""></div>
                <div class="val"><input class="inpttx" type="text" placeholder='输入您的支付宝账号' v-model="zfbzh"></div>
            </div>
            <div class="dlbtn pointer" @click="closeTx(),yongjintixian()">确认提现</div>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
          'money':String,
         },
  data() {
      return {
        zfbzh:'',
        isPopupVisibleCg: true
      }
  },
  name: 'popupTx',
  methods:{
    closeTx (){
      this.$emit('closeTx')
    },
    // closeTx1 (){
    //   this.$emit('closeTx1', this.isPopupVisibleCg)
    // },
    async yongjintixian() {
          var id = ''
          var sj = ''
          id = JSON.parse(window.localStorage.getItem('yonghuxinxi')).id
          console.log('这是id')
          console.log(id)
            sj = this.zfbzh
          var yj = new FormData()
          yj.set('userId',id)
          yj.set('money',this.money)
          yj.set('mobile',sj)
          const { data: res } = await this.$http.post('/app/zqDeposit/getTixianList.do',yj)
        console.log(res)
        this.$router.push({
        name:'home',
        query: {
          sutankuang: true,
          msg:res.msg
        }
      })
      },

    // 提现成功弹框
    showPopupCg(){
      this.isPopupVisibleCg = true
    },
    closePopupCg(){
      this.isPopupVisibleCg = false
    },
  }

}
</script>

<style>
  .container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .popup1 {
    background: #FFFFFF;
    height: 250px;
    width: 400px;
  }
  .biaoyu {
      font-size: 20px;
      font-weight: bold;
  }
  .closeone {
      width: 30px;
      height: 30px;
      font-size: 25px;
      color: #999999;
      background-color: #fff;
      border: 0;
      position: relative;
      left: 360px;
      top: 10px;
  }
  .body {
      width: 100%;
      height: 410px;
      padding: 15px;
  }
  .boxint {
      position: relative;
      height: 40px;
      width: 360px;
      background-color: #F6F6F6;
      margin-top: 25px;
  }
  .mima {
      position: relative;
      margin-top: 10px;
      left: 295px;
      color: #3C87CF;
  }
  .dlbtn {
      margin-top: 20px;
      height: 40px;
      width: 360px;
      background-color: #FF8B19;
      line-height: 40px;
      text-align:center;
      color: #fff;
      border-radius: 25px;
  }
  .img {
      position: absolute;
      width: 40px;
      height: 40px;
      line-height: 40px;
      top: 7px;
      left: 20px;
  }
  .imgic {
      width: 25px;
      height: 25px;
  }
  .val {
      position: absolute;
      left: 60px;
      height: 40px;
      line-height: 40px;
  }
  .inpttx {
      height: 32px;
      background:  #F6F6F6;
      border: 0;
      outline: none;
  }
  .yzm {
      position: absolute;
      line-height: 40px;
      right: 20px;
  }
  .yzmb {
      height: 40px;
      border: 0;
      background-color:#FAFAFA;
  }
</style>